/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.put.netbeans.dcs_modeler;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import org.openide.util.NbBundle;
import org.openide.util.Utilities;
import org.openide.windows.TopComponent;

/**
 * Action which shows ComputingObjectDefinitionEditor component.
 */
public class ComputingObjectDefinitionEditorAction extends AbstractAction
{

    public ComputingObjectDefinitionEditorAction()
    {
        super( NbBundle.getMessage( ComputingObjectDefinitionEditorAction.class, "CTL_ComputingObjectDefinitionEditorAction" ) );
        putValue( SMALL_ICON, new ImageIcon( Utilities.loadImage( ComputingObjectDefinitionEditorTopComponent.ICON_PATH, true ) ) );
    }

    public void actionPerformed( ActionEvent evt )
    {
        TopComponent win = ComputingObjectDefinitionEditorTopComponent.findInstance();
        win.open();
        win.requestActive();
    }
}
